<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>秋刀鱼</title>
    <link rel="stylesheet" href="../CSS/demo.css" />
  </head>
  <body>
    <div class="BOX_MARRY">
      <!-- Gif求婚动图 -->
      <div class="HEADER">
        <img src="../img/20250217111311.gif" alt="" />
      </div>
      <!-- 嫁给我字体 -->
      <div class="FONT_SIZE">
        <p>嫁给我</p>
      </div>
      <!-- 按键 -->
      <div class="BUTTON_BOX">
        <div class="BOX_NUMBER_ONE" id="myImg">同意</div>
        <div class="POPO" id="popo">
          <p>我会对你负责的宝贝~~~~</p>
          <img src="../img/20250217123758.gif" alt="">
          <button id="closePopup">关闭</button>
        </div>
        <div class="BOX_NUMBER_TWO" id="LIKE_LOVE">不同意</div>
      </div>
    </div>
  </body>
  <script>
    // 拿到内容
    const LIKE_LOVE = document.getElementById("LIKE_LOVE");
    const myImg = document.getElementById("myImg");
    const popo = document.getElementById("popo");
    const closePopup = document.getElementById("closePopup");
    // 设置为false
    // let isImg = false;
    // 设置初始值
    let countClick = 0;
    myImg.addEventListener("click", function () {
      popo.style.display = "block";
    });
    closePopup.addEventListener("click", function () {
      popo.style.display = "none";
    });
    LIKE_LOVE.addEventListener("click", function () {
      countClick++;
      let scaleFactor = 1 + countClick * 0.2;
      myImg.style.transform = `scale(${scaleFactor})`;
      if (countClick === 1) {
        this.textContent = "我真的很爱你";
      } else if (countClick === 2) {
        this.textContent = "快点同意";
      } else if (countClick === 3) {
        this.textContent = "不点同意就一直放大";
      } else if (countClick === 4) {
        this.textContent = "点同意";
      } else if (countClick === 5) {
        this.textContent = "为什么还是不同意";
      } else if (countClick === 6) {
        this.textContent = "最后一次机会";
      } else if (countClick === 7) {
        this.textContent = "好吧，那我只能去抢你了";
      }
    });
  </script>
</html>
